<?php

namespace App\Models\Enum;

/**
 * 邮件状态
 */
class MailType
{
    const SINGLE_SERVICE = 1;
    const SINGLE = 2;
    const BATCH = 3;
    const FULL_SERVICE = 4;

    public static function get($type)
    {
        switch ($type) {
            case self::SINGLE_SERVICE:
                return '单服邮件';
            case self::SINGLE:
                return '单人邮件';
            case self::BATCH:
                return '批量邮件';
            case self::FULL_SERVICE:
                return '全服邮件';
            default:
                return '类型未定义';
        }
    }

    public static function getAll()
    {
        return [
            self::SINGLE_SERVICE => self::get(self::SINGLE_SERVICE),
            self::SINGLE => self::get(self::SINGLE),
            self::BATCH => self::get(self::BATCH),
            self::FULL_SERVICE => self::get(self::FULL_SERVICE),
        ];
    }
}